package com.example.sesata.service;

import com.example.sesata.dao.StorageDao;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author chensixiang chensixiang1234@gmail.com
 */
@Service
@Slf4j
@RequiredArgsConstructor
public class StorageServiceImpl implements StorageService {
    private final StorageDao storageDao;

    @Override
    public void decrease(Long productId, Integer count) {
        log.info("---->开始扣减库存");
        storageDao.decrease(productId, count);
        log.info("---->结束扣减库存");
    }
}
